﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace 纸片人.InterfaceFolder
{
    public static class VectorExpand
    {

        public static Vector2 Multiply(this Vector2 v2, Vector3 v3)
        {
  
            Vector2 result = new Vector2();
            result.X = v2.X * v3.X ;
            result.Y = v2.Y * v3.Y;
            return result;
        }

        public static Vector2 Multiply(this Vector2 v2, Vector4 v4)
        {

            Vector2 result = new Vector2();
            result.X = v2.X * v4.X;
            result.Y = v2.Y * v4.Y;
            return result;
        }

        public static Vector3 Multiply(this Vector2 v2,SharpDX.Matrix3x3 m33)
        {
            Vector3 v3 = new Vector3(v2, 1);
            Vector3 result = new Vector3();

            result.X = v2.X*m33.M11+v2.X+m33.M21 + m33.M31;
            result.Y = v2.X * m33.M12 + v2.Y + m33.M22 + m33.M32;
            result.Z = v2.X*m33.M13+v2.Y+m33.M23 + m33.M33;
            return result;
        }

    }
}
